package com.micro.utils;

import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang3.StringUtils;
import org.jetbrains.annotations.Nullable;

import java.io.IOException;
import java.io.InputStream;
import java.nio.charset.StandardCharsets;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
import java.util.List;
import java.util.concurrent.locks.Lock;
import java.util.concurrent.locks.ReentrantLock;

/**
 * 执行命令类
 */
@Slf4j
public class Aria2cUtil {
    private static final Lock lock = new ReentrantLock();
    public static final String COMMAND =  Aria2cUtil.class.getResource("aria2c.exe").getFile();

    public static void main(String[] args) throws IOException {
        System.out.println(ProcessUtil.executeCommand(COMMAND,"-h"));

    }
}
